<template>
  <div>
    <ul>
      <li v-for="v in mess" :key="v.id">
        <h3>{{ v.nickname }}</h3>
        <p>{{ v.message }}</p>
        <p>
          {{ v.datetime }}
          <button @click="handleClick(v.id)">删除</button>
        </p>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  props: ['mess'],
  methods: {
    handleClick(id) {
      this.$emit('deleteMess', id)
    }
  }
}
</script>